package com.carepad.dao;

import com.carepad.entity.RecordItemsGroup;
import com.carepad.entity.RecordItemsGroupExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

public interface RecordItemsGroupMapper {

	int countByExample(RecordItemsGroupExample example);

	int deleteByExample(RecordItemsGroupExample example);

	int deleteByPrimaryKey(Integer uid);

	int insert(RecordItemsGroup record);

	int insertSelective(RecordItemsGroup record);

	List<RecordItemsGroup> selectByExample(RecordItemsGroupExample example);

	RecordItemsGroup selectByPrimaryKey(Integer uid);

	int updateByExampleSelective(@Param("record") RecordItemsGroup record, @Param("example") RecordItemsGroupExample example);

	int updateByExample(@Param("record") RecordItemsGroup record, @Param("example") RecordItemsGroupExample example);

	int updateByPrimaryKeySelective(RecordItemsGroup record);

	int updateByPrimaryKey(RecordItemsGroup record);
	

	@Select("SELECT * FROM mst_record_items_group ORDER BY DISPLAY_GROUP_ORDER ")
	@ResultMap(value = "MenuItemsMap")
	List<RecordItemsGroup> findRecordItemsGroupList();

	@Select("SELECT * FROM mst_record_items_group ORDER BY SORT_ORDER LIMIT #{start}, #{size}")
	@ResultMap(value = "RecordItemsGroupList")
	List<RecordItemsGroup> findListPaginated(@Param("start") Integer start,	@Param("size") Integer size);

	@Select("SELECT COUNT(*) FROM mst_record_items_group")
	Integer countAll();

}